<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>5</cardCount>
<cardID>2114</cardID>
<listID>6692</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>416</width>
<height>256</height>
</cardSize>
<script>∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞Script of stack AddressesVersion 2.1THE MESSAGE HANDLERS USED IN THIS SCRIPT:openCard,openStack,closeStack,openBackground,resume,suspend,resumeStack,suspendStack,updateMenu,createtheMenu,unCheckItems,changeMenuItemStatus,setLocationCheckMark,goAddresses,goOverview,goSortPreferences,goMarkCards,deleteStackMenu,returnToAddressCard,toggleTipTHE FUNCTION HANDLERS USED IN THIS SCRIPT:wrongStack,menuItemData,navMenuItemData,sortMenuItemDatamiscMenuItemData,menuMsgData"--∆" indicates strings which will need localization∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞on openStack-- Requires handlers: createTheMenu,wrongStackif not wrongStack() then createTheMenupass openStackend openStackon closeStack-- Requires handlers: deleteStackMenu,wrongStackif not wrongStack() then deleteStackMenupass closeStackend closeStackon openBackground-- Requires handlers: updateMenu,wrongStackif not wrongStack() then updateMenupass openBackgroundend openBackgroundon closeBackground-- Requires handler: changeMenuItemStatus,wrongStack()-- enable all menu itemsif wrongStack() then pass closeBackground -- in case stackInUseif (short name of this bg is "Body") thenpush card -- Store current card for possible returnelse changeMenuItemStatus enable,"sort,misc,nav"pass closeBackgroundend closeBackgroundon resume-- Requires handlers: createTheMenu,wrongStackif not wrongStack() then updateMenupass resumeend resumeon suspend-- Requires handlers: deleteStackMenu,wrongStackif not wrongStack() then deleteStackMenupass suspendend suspendon resumeStack-- Requires handlers: createTheMenu,wrongStackif not wrongStack() then updateMenupass resumeStackend resumeStackon suspendStack-- Requires handlers: deleteStackMenu,wrongStackif not wrongStack() then deleteStackMenupass suspendStackend suspendStackfunction wrongStack -- in case stackInUsereturn (the value of word 2 of the long name of me is not line 1 of the stacks)end wrongStack----- Menu Scripts ----------------------------------------------on updateMenu-- Requires handlers: changeMenuItemStatus,createtheMenu,-- Requires handlers setLocationCheckMark,wrongStackcreatetheMenuif (short name of this bg is "Body") thensetLocationCheckMark(Addresses)elsechangeMenuItemStatus disable,"sort,misc"unmark this card -- so export doesn't failsetLocationCheckMark(short name of this cd)end ifend updateMenuon createTheMenu-- Requires function handlers: menuItemData,menuMsgDataglobal StackMenuput "Utilities" into StackMenu -- ∆-- remove any existing menus that might have the same nameif there is a menu StackMenu then delete menu StackMenucreate menu StackMenuput menuItemData() into menu StackMenu with menuMsg menuMsgData()end createTheMenufunction menuItemData-- menu items for the Utilities menureturn "Sort by Name,Sort by Company,Sort by City," & ¬"Sort by State,Sort by Zip Code,-,Print Addresses," & ¬"Import Text...,Export Text...,-,Addresses,Mark Cards," & ¬"Sort Preferences,Stack Overview" -- ∆end menuItemDatafunction menuMsgData-- menu messages for the Utilities menureturn "sortCards Name,sortCards Company,sortCards City," & ¬"sortCards State,sortCards Zip,none,printReport,importText," & ¬"exportText,none,goAddresses,goMarkCards,goSortPreferences,goOverview"end menuMsgDataon changeMenuItemStatus status,theItems-- enables or disables menu itemsglobal StackMenuif there is no menu StackMenu then exit changeMenuItemStatusput (the short name of this bg is "Body") into updaterepeat with i = 1 to 9set enabled of menuItem i of menu StackMenu to updateend repeatend changeMenuItemStatuson unCheckItems-- removes all check marks associated with navigational menu itemsglobal StackMenuif there is no menu StackMenu then exit unCheckItemsrepeat with i = 11 to 14set checkMark of menuItem i of menu StackMenu to falseend repeatend unCheckItemson setLocationCheckMark locationMenu-- Requires handler: unCheckItems,menuItemData-- set check mark for current user locationglobal StackMenuunCheckItemsif locationMenu is not in menuItemData()then put "Addresses" into locationMenu -- ∆set the checkMark of menuItem locationMenu of menu StackMenu to trueend setLocationCheckMark----- Navigational Scripts -----------------------------------------on goAddressesgo bg "Body"end goAddresseson goOverviewgo cd "Stack Overview"end goOverviewon goSortPreferencesgo cd "Sort Preferences"end goSortPreferenceson goMarkCardsgo cd "Mark Cards"end goMarkCardson deleteStackMenuglobal StackMenuif StackMenu is in the menus thendelete menu StackMenuput empty into StackMenu -- clean-up for exitend ifend deleteStackMenuon returnToAddressCardpop cd into returnCardif the long name of this stack is in returnCardthen go returnCardelse goAddressesend returnToAddressCard----- Misc. --------------------------------------------------------on toggleTip visStatus,theFieldlock screenif visStatus thenput "open" into theVisEffect-- card field id theField is a hidden field on this cardset the scroll of cd fld id theField to 0 -- scroll to the topelse put "close" into theVisEffectset the visible of cd fld id theField to visStatusset the hilite of cd btn "About Hiliter" to visStatusunlock screen with visual zoom theVisEffectend toggleTip</script>